- Description:
This key defines scope to configure at a file level, without adding configuration to files.
- Appears in:
└── file_config └── [*]- Type:
Object- Properties:
This key defines which Rich Text editors have custom configuration for the associated WYSIWYG toolbar.
For more information, please read our documentation on Rich Text editors.
Show examplesHide examples
In this example, we have configured the Snippet tool for WYSIWYG toolbars in the
blogCollection.Copied to clipboardcollections_config: blog: _editables: content: snippet: true{ "collections_config": { "blog": { "_editables": { "content": { "snippet": true } } } } }This key defines globs that filter which files CloudCannon should use for configuring Rich Text formatting.
Values in this array are relative to the root of your repository (i.e.,
/, not the value ofsource) and must end in the file extension.cloudcannon.editables.yml.You can use this key anywhere you would use the
_editableskey in the configuration cascade.This key has no default.
Show examplesHide examples
In this example, we have several WYSIWYG Toolbar Configuration Files in the
.cloudcannon/editables/folder, with each file containing multiple definitions. The value of the_editables_from_globkey tells CloudCannon all files in that folder that match the glob*.cloudcannon.editables.yml.Copied to clipboard_editables_from_glob: - /.cloudcannon/editables/*.cloudcannon.editables.yml{ "_editables_from_glob": [ "/.cloudcannon/editables/*.cloudcannon.editables.yml" ] }Copied to clipboardtext: bold: true italic: true underline: true block: format: p h3 undo: true redo: true link: bold: true italic: true underline: true{ "text": { "bold": true, "italic": true, "underline": true }, "block": { "format": "p h3", "undo": true, "redo": true }, "link": { "bold": true, "italic": true, "underline": true } }This key defines which editing interfaces are available by default for files at a given level of the configuration cascade.
Whether an editing interface is available for a specific file is determined by other factors.
Values can be one of the following:
visual,content, ordata.Specifying one or more editing interfaces will disable all unspecified editing interfaces.
You cannot disable the Source Editor with this key.
By default, this key is set to
visual,content, anddata.If undefined at higher levels of the configuration cascade,
_enabled_editableswill default to any values configured in the CloudCannon configuration file.For more information, please read our documentation on the Visual Editor, Content Editor, Data Editor, and Source Editor.
Show examplesHide examples
In this example, we have enabled only the Content Editor in the
blogCollection.Copied to clipboardcollections_config: blog: _enabled_editors: - content{ "collections_config": { "blog": { "_enabled_editors": [ "content" ] } } }This key defines the glob pattern(s) targeting a path to one or more files.
Show examplesHide examples
In this example, we have configured a file config to target the
data/tabs.ymlfile with object input configuration.Copied to clipboardfile_config: - glob: data/tabs.yml _inputs: $: type: object options: subtype: tabbed{ "file_config": [ { "glob": "data/tabs.yml", "_inputs": { "$": { "type": "object", "options": { "subtype": "tabbed" } } } } ] }This key defines which inputs are available at a given level of the configuration cascade.
This key has no default.
If undefined at higher levels of the configuration cascade,
_inputswill default to any values configured in the CloudCannon configuration file.Show examplesHide examples
In this example, we have configured the
date_createdkey as a Date and Time Input, which will automatically populate when you create a file using this input. Editors cannot alter this input as the interface is disabled.Copied to clipboard_inputs: date_created: type: datetime label: Date of article creation comment: UTC +0 timezone context: open: false title: Help icon: help content: This date field will automatically populate when you create an article. hidden: false disabled: true instance_value: NOW cascade: true options: timezone: Etc/UTC{ "_inputs": { "date_created": { "type": "datetime", "label": "Date of article creation", "comment": "UTC +0 timezone", "context": { "open": false, "title": "Help", "icon": "help", "content": "This date field will automatically populate when you create an article." }, "hidden": false, "disabled": true, "instance_value": "NOW", "cascade": true, "options": { "timezone": "Etc/UTC" } } } }In this example, we have configured the
blog_tagskey as a Multiselect Input in theblogCollection.Copied to clipboardcollections_config: blog: _inputs: blog_tags: type: multiselect label: Blog type comment: Select a blog type context: open: false title: Help icon: help content: | Blog tags help our users filter articles by topic. options: values: - Opinion - Feature - Resource{ "collections_config": { "blog": { "_inputs": { "blog_tags": { "type": "multiselect", "label": "Blog type", "comment": "Select a blog type", "context": { "open": false, "title": "Help", "icon": "help", "content": "Blog tags help our users filter articles by topic.\n" }, "options": { "values": [ "Opinion", "Feature", "Resource" ] } } } } } }This key defines globs that filter which files CloudCannon should use for Input configuration.
Values in this array are relative to the root of your repository (i.e.,
/, not the value ofsource) and must end in the file extension.cloudcannon.inputs.yml.You can use this key anywhere you would use the
_inputskey in the configuration cascade.This key has no default.
Show examplesHide examples
In this example, we have several Input Configuration Files in the
.cloudcannon/inputs/folder, with each file containing multiple Input definitions. The value of the_inputs_from_globkey tells CloudCannon to only use theseo.cloudcannon.inputs.ymlandblog-details.cloudcannon.inputs.ymlfiles in that folder.Copied to clipboardcollections_config: posts: path: content/posts icon: event inputs_from_glob: - /.cloudcannon/inputs/seo.cloudcannon.inputs.yml - /.cloudcannon/inputs/blogDetails.cloudcannon.inputs.yml{ "collections_config": { "posts": { "path": "content/posts", "icon": "event", "inputs_from_glob": [ "/.cloudcannon/inputs/seo.cloudcannon.inputs.yml", "/.cloudcannon/inputs/blogDetails.cloudcannon.inputs.yml" ] } } }Copied to clipboardseo_title: type: text options: required: true max_length: 50 seo_description: type: textarea options: show_count: true required: true max_length: 125 seo_image: type: image options: path: uploads: images accepts_mime_types: - image/png - image/jpeg required: true pattern: (?i)\.(jpe?g|png)$ pattern_message: Please select a JPG or PNG image file{ "seo_title": { "type": "text", "options": { "required": true, "max_length": 50 } }, "seo_description": { "type": "textarea", "options": { "show_count": true, "required": true, "max_length": 125 } }, "seo_image": { "type": "image", "options": { "path": { "uploads": "images" }, "accepts_mime_types": [ "image/png", "image/jpeg" ], "required": true, "pattern": "(?i)\\.(jpe?g|png)$", "pattern_message": "Please select a JPG or PNG image file" } } }This key defines defines fixed data sets to populate Select and Multiselect inputs at a given level of the configuration cascade.
This key has no default.
If undefined at higher levels of the configuration cascade,
_select_datawill default to any values configured in the CloudCannon configuration file.For more information, please read our documentation on Select and Multiselect inputs.
Show examplesHide examples
In this example, we have configured the
blog_tagsMultiselect input for theblogCollection.Copied to clipboardcollections_config: blog: _select_data: blog_topics: - Opinion - Feature - Resource{ "collections_config": { "blog": { "_select_data": { "blog_topics": [ "Opinion", "Feature", "Resource" ] } } } }This key defines which structures are available for Object inputs and Array inputs at a given level of the configuration cascade.
This key has no default.
If undefined at higher levels of the configuration cascade,
_structureswill default to any values configured in the CloudCannon configuration file.For more information, please read our documentation on structures.
Show examplesHide examples
In this example, we want to populate an Array input in the
blogCollection with Related Articles, including thename,description, andurlfields.Copied to clipboardcollections_config: blog: _structures: related_articles: style: select values: - preview: text: - key: name subtext: - key: url value: name: description: url:{ "collections_config": { "blog": { "_structures": { "related_articles": { "style": "select", "values": [ { "preview": { "text": [ { "key": "name" } ], "subtext": [ { "key": "url" } ] }, "value": { "name": null, "description": null, "url": null } } ] } } } } }In this example, we want to populate an Array input with Staff members, including the
name,job_description, andprofile_picturefields for all staff types, and theurlfield for Managers only.Copied to clipboard_structures: staff: style: modal hide_extra_inputs: false values: - value: _type: Employee name: job_description: profile_picture: preview: text: - key: name - Employee subtext: - key: job_description - Description of position image: - key: profile_picture icon: support_agent - value: _type: Manager name: job_description: profile_picture: url: preview: text: - key: name - Manager subtext: - key: job_description - Description of position image: - key: profile_picture icon: face{ "_structures": { "staff": { "style": "modal", "hide_extra_inputs": false, "values": [ { "value": { "_type": "Employee", "name": null, "job_description": null, "profile_picture": null }, "preview": { "text": [ { "key": "name" }, "Employee" ], "subtext": [ { "key": "job_description" }, "Description of position" ], "image": [ { "key": "profile_picture" } ], "icon": "support_agent" } }, { "value": { "_type": "Manager", "name": null, "job_description": null, "profile_picture": null, "url": null }, "preview": { "text": [ { "key": "name" }, "Manager" ], "subtext": [ { "key": "job_description" }, "Description of position" ], "image": [ { "key": "profile_picture" } ], "icon": "face" } } ] } } }This key defines globs that filter which files CloudCannon should use for Structure configuration.
Values in this array are relative to the root of your repository (i.e.,
/, not the value ofsource) and must end in the file extension.cloudcannon.structures.yml.You can use this key anywhere you would use the
_structureskey in the configuration cascade.Please see our documentation on values_from_glob for defining individual Structure values in a split Configuration File.
This key has no default.
Show examplesHide examples
In this example, we have several Structure Configuration Files in the
.cloudcannon/structures/folder. The value of the_structures_from_globkey tells CloudCannon to use thestaffMembers.cloudcannon.structures.ymlfile in that folder.Copied to clipboard_structures_from_glob: - /.cloudcannon/structures/staffMembers.cloudcannon.structures.yml{ "_structures_from_glob": [ "/.cloudcannon/structures/staffMembers.cloudcannon.structures.yml" ] }Copied to clipboardstaff: style: modal values: - label: Employee value: name: job_description: profile_picture: - label: Manager value: name: job_description: profile_picture: url:{ "staff": { "style": "modal", "values": [ { "label": "Employee", "value": { "name": null, "job_description": null, "profile_picture": null } }, { "label": "Manager", "value": { "name": null, "job_description": null, "profile_picture": null, "url": null } } ] } }- Examples: